#ifndef ATTRIBUTE_H
#define ATTRIBUTE_H

#include <string>
#include <iostream>

class Attribute {
	
public:
	enum Type { CDATA };
	enum Constraint { IMPLIED, REQUIRED };
	Attribute (std::string& aName, Type aType, Constraint aConstraint, std::string aDefault = "");
	virtual ~Attribute ();
	
	virtual void print(std::ostream& out);

protected:
	std::string name;
	Type type;
	Constraint constraint;
	std::string def; //default
	
	std::ostream& printConstraint(std::ostream& out);
	std::ostream& printType(std::ostream& out);

};

#endif //ATTRIBUTE_H
